import { useQuery } from "@tanstack/react-query";
import { getRewardLog } from "../../api";
import styles from "./index.module.scss";
export default function MyRewardButton(props) {
  const { data } = useQuery({
    queryKey: "get/reward/logs",
    queryFn: () => getRewardLog(),
  });

  if (data?.data?.length <= 0) return <></>;
  return (
    <button
      className={styles.button}
      onClick={() => props.onClick && props.onClick()}
    />
  );
}
